package edu.whut;

import com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput;

/*
1.包装类：
    byte    Byte
    short   Short
    int     Integer
    long    Long
    float   Float
    double  Double
    boolean Boolean
    char    Character
2.手动装箱、手动拆箱
    Integer integer = Integer.valueOf(num);
    int i = integer.intValue();
3.自动拆装箱
    JDK5之后，可以自动拆装箱
     Integer i1 = num;
     int i = i1;
4.Integer常用方法
    toBinaryString(i1)转2进制
    toOctalString(i1)转8进制
    toHexString(i1)转16进制
    parseInt(String s) 将数字字符串，转换为数字
 */
public class IntegerDemo {
    public static void main(String[] args) {
        int num = 10;
        Integer i1 = num;
        System.out.println(Integer.toBinaryString(i1));
        System.out.println(Integer.toOctalString(i1));
        System.out.println(Integer.toHexString(i1));

        String s = "123";
        System.out.println(s+100);
        System.out.println(Integer.parseInt(s)+100);
    }
}
